package deploy

import (
	"fmt"
	MetaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"kubeUser/internal/pkg/client"
)


// 获取deploy 列表
func ListDeployByNs(NameSpace string)  {
	deployList,err := client.KubeManger.ClientSet.AppsV1().Deployments(NameSpace).List(MetaV1.ListOptions{})
	if err != nil {
		fmt.Println(err)
		return
	}
	for _,item :=range  deployList.Items {
		fmt.Println(item.Name)
	}
}
